// @ts-ignore
import { api } from '@/utils/api';

/** 新增系统配置信息数据 POST /systemConfig/add */
export async function systemConfigAdd(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function systemConfigAdd(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function systemConfigAdd(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function systemConfigAdd(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/systemConfig/add`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/systemConfig/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 删除系统配置信息数据 POST /systemConfig/delete */
export async function systemConfigDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function systemConfigDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function systemConfigDelete(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function systemConfigDelete(body: BASE.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/systemConfig/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/systemConfig/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取前端配置信息数据 POST /systemConfig/front */
export async function systemConfigFront(
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultListSystemConfig>;

export async function systemConfigFront(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultListSystemConfig>>;

export async function systemConfigFront(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultListSystemConfig>;

export async function systemConfigFront(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultListSystemConfig>(`/app/systemConfig/front`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultListSystemConfig>(`/app/systemConfig/front`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 获取系统配置信息数据 POST /systemConfig/get */
export async function systemConfigGet(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultSystemConfig>;

export async function systemConfigGet(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultSystemConfig>>;

export async function systemConfigGet(
  body: BASE.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultSystemConfig>;

export async function systemConfigGet(body: BASE.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultSystemConfig>(`/app/systemConfig/get`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultSystemConfig>(`/app/systemConfig/get`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取系统配置body POST /systemConfig/getBody */
export async function systemConfigGetBody(
  body: BASE.AutoDtoWithSystemconfigGetbody,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function systemConfigGetBody(
  body: BASE.AutoDtoWithSystemconfigGetbody,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function systemConfigGetBody(
  body: BASE.AutoDtoWithSystemconfigGetbody,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function systemConfigGetBody(
  body: BASE.AutoDtoWithSystemconfigGetbody,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/systemConfig/getBody`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/systemConfig/getBody`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取系统配置信息列表数据 POST /systemConfig/list */
export async function systemConfigList(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultListSystemConfig>;

export async function systemConfigList(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultListSystemConfig>>;

export async function systemConfigList(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultListSystemConfig>;

export async function systemConfigList(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultListSystemConfig>(`/app/systemConfig/list`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultListSystemConfig>(`/app/systemConfig/list`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取系统配置信息分页数据 POST /systemConfig/page */
export async function systemConfigPage(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResultIPageSystemConfig>;

export async function systemConfigPage(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResultIPageSystemConfig>>;

export async function systemConfigPage(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResultIPageSystemConfig>;

export async function systemConfigPage(
  body: BASE.SystemConfigQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResultIPageSystemConfig>(`/app/systemConfig/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResultIPageSystemConfig>(`/app/systemConfig/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 设置系统配置值 POST /systemConfig/set */
export async function systemConfigSet(
  body: BASE.SetValueDTO[],
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function systemConfigSet(
  body: BASE.SetValueDTO[],
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function systemConfigSet(
  body: BASE.SetValueDTO[],
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function systemConfigSet(
  body: BASE.SetValueDTO[],
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/systemConfig/set`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/systemConfig/set`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 设置系统配置body POST /systemConfig/setBody */
export async function systemConfigSetBody(
  body: BASE.AutoDtoWithSystemconfigSetbody,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function systemConfigSetBody(
  body: BASE.AutoDtoWithSystemconfigSetbody,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function systemConfigSetBody(
  body: BASE.AutoDtoWithSystemconfigSetbody,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function systemConfigSetBody(
  body: BASE.AutoDtoWithSystemconfigSetbody,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/systemConfig/setBody`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/systemConfig/setBody`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 更新系统配置信息数据 POST /systemConfig/update */
export async function systemConfigUpdate(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1]
): Promise<BASE.IResult>;

export async function systemConfigUpdate(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BASE.IResult>>;

export async function systemConfigUpdate(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BASE.IResult>;

export async function systemConfigUpdate(
  body: BASE.SystemConfig,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BASE.IResult>(`/app/systemConfig/update`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BASE.IResult>(`/app/systemConfig/update`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
